<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
</head>

<body>
<?php
//mysql_connect("localhost","wanzai_mylibrary","881006");
mysql_connect("127.0.0.1","root","");
mysql_select_db("wanzai_mylibrary");
mysql_query('SET NAMES UTF8');
/*if($_REQUEST['key']!=null){
$sql=mysql_query("SELECT * FROM  `book` WHERE B_Name LIKE  '%".$_REQUEST['key']."%'");
}
*/
$sql=mysql_query("SELECT * FROM  `book`");
	while($e=mysql_fetch_assoc($sql))
			$output[]=$e;

$code = json_encode($output);
$code = preg_replace("#\\\u([0-9a-f]+)#ie", "iconv('UCS-2', 'UTF-8', pack('H4', '\\1'))",$code);
print($code);
mysql_close();
?>
</body>
</html>